static void
ensure_icon_size (GtkIconHelper *self,
- GtkStyleContext *context,
gint *width_out,
gint *height_out)
{
icon_theme = gtk_icon_theme_get_for_screen (gtk_style_context_get_screen (context));
flags = get_icon_lookup_flags (self, context);
- ensure_icon_size (self, context, &width, &height);
+ ensure_icon_size (self, &width, &height);
if (self->priv->gicon != NULL)
{
static void
get_surface_size (GtkIconHelper *self,
- GtkStyleContext *context,
cairo_surface_t *surface,
int *width,
int *height)
ceil (cairo_image_surface_get_height (surface) / y_scale);
}
else
- ensure_icon_size (self, context, width, height);
+ ensure_icon_size (self, width, height);
}
static void
if (self->priv->rendered_pixbuf)
return;
- get_surface_size (self, context, self->priv->orig_surface, &width, &height);
+ get_surface_size (self, self->priv->orig_surface, &width, &height);
surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
width, height);
(self->priv->pixel_size != -1 ||
self->priv->icon_size != GTK_ICON_SIZE_INVALID))
{
- ensure_icon_size (self, context, &width, &height);
+ ensure_icon_size (self, &width, &height);
if (self->priv->orig_pixbuf_scale > 1 ||
/* These should divide the orig_pixbuf size by scale, but need not
self->priv->rendered_surface =
cairo_surface_reference (self->priv->orig_surface);
- get_surface_size (self, context, self->priv->orig_surface,
+ get_surface_size (self, self->priv->orig_surface,
&self->priv->rendered_surface_width,
&self->priv->rendered_surface_height);
}
(self->priv->pixel_size != -1 ||
self->priv->icon_size != GTK_ICON_SIZE_INVALID))
{
- ensure_icon_size (self, context, &width, &height);
+ ensure_icon_size (self, &width, &height);
if (scale != self->priv->orig_pixbuf_scale ||
width < gdk_pixbuf_get_width (self->priv->orig_pixbuf) / self->priv->orig_pixbuf_scale ||
G_GNUC_END_IGNORE_DEPRECATIONS;
if (self->priv->rendered_surface)
- get_surface_size (self, context, self->priv->rendered_surface,
+ get_surface_size (self, self->priv->rendered_surface,
&self->priv->rendered_surface_width,
&self->priv->rendered_surface_height);
}
icon_theme = gtk_icon_theme_get_for_screen (gtk_style_context_get_screen (context));
flags = get_icon_lookup_flags (self, context);
- ensure_icon_size (self, context, &width, &height);
+ ensure_icon_size (self, &width, &height);
scale = get_scale_factor (self, context);
if (self->priv->gicon != NULL)
switch (self->priv->storage_type)
{
case GTK_IMAGE_SURFACE:
- get_surface_size (self, context, self->priv->orig_surface,
+ get_surface_size (self, self->priv->orig_surface,
&width,
&height);
break;
case GTK_IMAGE_ICON_NAME:
case GTK_IMAGE_GICON:
if (self->priv->pixel_size != -1 || self->priv->force_scale_pixbuf)
- ensure_icon_size (self, context, &width, &height);
+ ensure_icon_size (self, &width, &height);
break;
}
else if (self->priv->icon_size != GTK_ICON_SIZE_INVALID)
{
- ensure_icon_size (self, context, &width, &height);
+ ensure_icon_size (self, &width, &height);
}
}